.container {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.header {
  margin-bottom: 32px;
}

.header h1 {
  margin: 0 0 8px 0;
  font-size: 2rem;
  font-weight: 600;
  color: var(--foreground);
}

.header p {
  margin: 0;
  color: var(--foreground-tertiary);
  font-size: 1.125rem;
}

.content {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
}

.leftPanel,
.rightPanel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section {
  padding: 24px;
}

.section h3 {
  margin: 0 0 16px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
}

.sectionHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.sectionHeader h3 {
  margin: 0;
}

/* 开发板选择 */
.boardGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.boardCard {
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.boardCard:hover {
  border-color: var(--info);
}

.boardCard.selected {
  border-color: var(--info);
  background: var(--accent);
}

.boardName {
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 4px;
}

.boardDesc {
  font-size: 0.875rem;
  color: var(--foreground-tertiary);
}

/* 文件处理 */
.hiddenInput {
  display: none;
}

.emptyState {
  text-align: center;
  padding: 48px 24px;
  color: var(--foreground-tertiary);
}

.emptyIcon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--foreground-tertiary);
}

.supportedFormats {
  font-size: 0.875rem;
  color: var(--foreground-tertiary);
}

.fileList {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fileItem {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--muted);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.fileInfo {
  flex: 1;
}

.fileName {
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 4px;
}

.fileDetails {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--foreground-tertiary);
}

.fileAddress {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
}

.fileAddress label {
  color: var(--foreground-tertiary);
}

.addressInput {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.875rem;
  width: 80px;
}

.removeButton {
  color: var(--error);
  font-size: 1.25rem;
  padding: 4px 8px;
}

/* 刷写控制 */
.flashControls {
  display: flex;
  gap: 12px;
}

.flashButton {
  flex: 1;
}

/* 刷写进度 */
.stepsList {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.stepIndicator {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.stepIcon {
  width: 16px;
  height: 16px;
}

.step.pending .stepIndicator {
  background: var(--muted);
  color: var(--foreground-tertiary);
}

.step.running .stepIndicator {
  background: var(--accent);
  color: var(--info);
}

.step.completed .stepIndicator {
  background: var(--success);
  color: var(--success-foreground);
}

.step.error .stepIndicator {
  background: var(--error);
  color: var(--error);
}

.stepNumber {
  font-size: 0.875rem;
  font-weight: 600;
}

.spinner {
  animation: spin 1s linear infinite;
}

.spinnerCircle {
  opacity: 0.25;
}

.spinnerPath {
  opacity: 0.75;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.stepContent {
  flex: 1;
}

.stepTitle {
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 4px;
}

.stepDescription {
  font-size: 0.875rem;
  color: var(--foreground-tertiary);
  margin-bottom: 8px;
}

.progressBar {
  width: 100%;
  height: 4px;
  background: var(--muted);
  border-radius: 2px;
  overflow: hidden;
}

.progressFill {
  height: 100%;
  background: var(--info);
  transition: width 0.3s ease;
}

/* 使用说明 */
.instructions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.instruction {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
}

.stepNum {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--info);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.tips {
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.tips h4 {
  margin: 0 0 12px 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}

.tips ul {
  margin: 0;
  padding-left: 16px;
  font-size: 0.875rem;
  color: var(--foreground-tertiary);
}

.tips li {
  margin-bottom: 4px;
}

.tips code {
  background: var(--muted);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.8em;
}

